#coding=utf-8
import serial
import time
if __name__ == "__main__":
    ser=serial.Serial("/dev/pts/2",9600,timeout=0.5) #使用USB连接串行口
    while(True):
        ser.write(b"+  16.03564 g\r\n")
        time.sleep(100)
    ser.close()#关闭端口
